home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / flex 2.4.6 / skel.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-29  |  32.8 KB  |  1,232 lines  |  [TEXT/MPS ]

  1. /* File created from flex.skl via mkskel.sh for MPW */
  2.  
  3. #include "flexdef.h"
  4.  
  5. char *skel[] = {
  6.   "/* A lexical scanner generated by flex */",
  7.   "",
  8.   "/* Scanner skeleton version:",
  9.   " * $Header: flex.skl,v 1.2 94/01/04 14:33:15 vern Exp $",
  10.   " */",
  11.   "",
  12.   "#define FLEX_SCANNER",
  13.   "",
  14.   "%-",
  15.   "#include <stdio.h>",
  16.   "",
  17.   "#ifdef macintosh",
  18.   "#ifndef fileno",
  19.   "#define fileno(p)    (p)->_file",
  20.   "#endif",
  21.   "#include <ioctl.h>",
  22.   "#define isatty(fd)    (ioctl(fd, FIOINTERACTIVE, NULL) == 0)",
  23.   "#endif",
  24.   "%*",
  25.   "",
  26.   "",
  27.   "/* cfront 1.2 defines \"c_plusplus\" instead of \"__cplusplus\" */",
  28.   "#ifdef c_plusplus",
  29.   "#ifndef __cplusplus",
  30.   "#define __cplusplus",
  31.   "#endif",
  32.   "#endif",
  33.   "",
  34.   "",
  35.   "#ifdef __cplusplus",
  36.   "",
  37.   "#include <stdlib.h>",
  38.   "%+",
  39.   "class istream;",
  40.   "%*",
  41.   "#include <unistd.h>",
  42.   "",
  43.   "/* Use prototypes in function declarations. */",
  44.   "#define YY_USE_PROTOS",
  45.   "",
  46.   "/* The \"const\" storage-class-modifier is valid. */",
  47.   "#define YY_USE_CONST",
  48.   "",
  49.   "#else    /* ! __cplusplus */",
  50.   "",
  51.   "#if defined(__STDC__) || defined(macintosh) || defined(THINK_C)",
  52.   "",
  53.   "#define YY_USE_PROTOS",
  54.   "#define YY_USE_CONST",
  55.   "",
  56.   "#endif    /* __STDC__ */",
  57.   "#endif    /* ! __cplusplus */",
  58.   "",
  59.   "",
  60.   "#ifdef __TURBOC__",
  61.   "#define YY_USE_CONST",
  62.   "#endif",
  63.   "",
  64.   "",
  65.   "#ifndef YY_USE_CONST",
  66.   "#ifndef const",
  67.   "#define const",
  68.   "#endif",
  69.   "#endif",
  70.   "",
  71.   "",
  72.   "#ifdef YY_USE_PROTOS",
  73.   "#define YY_PROTO(proto) proto",
  74.   "#else",
  75.   "#define YY_PROTO(proto) ()",
  76.   "#endif",
  77.   "",
  78.   "/* Returned upon end-of-file. */",
  79.   "#define YY_NULL 0",
  80.   "",
  81.   "/* Promotes a possibly negative, possibly signed char to an unsigned",
  82.   " * integer for use as an array index.  If the signed char is negative,",
  83.   " * we want to instead treat it as an 8-bit unsigned char, hence the",
  84.   " * double cast.",
  85.   " */",
  86.   "#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)",
  87.   "",
  88.   "/* Enter a start condition.  This macro really ought to take a parameter,",
  89.   " * but we do it the disgusting crufty way forced on us by the ()-less",
  90.   " * definition of BEGIN.",
  91.   " */",
  92.   "#define BEGIN yy_start = 1 + 2 *",
  93.   "",
  94.   "/* Translate the current start state into a value that can be later handed",
  95.   " * to BEGIN to return to the state.",
  96.   " */",
  97.   "#define YY_START ((yy_start - 1) / 2)",
  98.   "",
  99.   "/* Action number for EOF rule of a given start state. */",
  100.   "#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)",
  101.   "",
  102.   "/* Special action meaning \"start processing a new file\".  Now included",
  103.   " * only for backward compatibility with previous versions of flex.",
  104.   " */",
  105.   "#define YY_NEW_FILE yyrestart( yyin )",
  106.   "",
  107.   "#define YY_END_OF_BUFFER_CHAR 0",
  108.   "",
  109.   "/* Size of default input buffer. */",
  110.   "#define YY_BUF_SIZE 16384",
  111.   "",
  112.   "typedef struct yy_buffer_state *YY_BUFFER_STATE;",
  113.   "",
  114.   "extern int yyleng;",
  115.   "%-",
  116.   "extern FILE *yyin, *yyout;",
  117.   "%*",
  118.   "",
  119.   "#ifdef __cplusplus",
  120.   "extern \"C\" {",
  121.   "#endif",
  122.   "    extern int yywrap YY_PROTO(( void ));",
  123.   "#ifdef __cplusplus",
  124.   "    }",
  125.   "#endif",
  126.   "",
  127.   "#define EOB_ACT_CONTINUE_SCAN 0",
  128.   "#define EOB_ACT_END_OF_FILE 1",
  129.   "#define EOB_ACT_LAST_MATCH 2",
  130.   "",
  131.   "/* The funky do-while in the following #define is used to turn the definition",
  132.   " * int a single C statement (which needs a semi-colon terminator).  This",
  133.   " * avoids problems with code like:",
  134.   " *",
  135.   " *     if ( condition_holds )",
  136.   " *        yyless( 5 );",
  137.   " *    else",
  138.   " *        do_something_else();",
  139.   " *",
  140.   " * Prior to using the do-while the compiler would get upset at the",
  141.   " * \"else\" because it interpreted the \"if\" statement as being all",
  142.   " * done when it reached the ';' after the yyless() call.",
  143.   " */",
  144.   "",
  145.   "/* Return all but the first 'n' matched characters back to the input stream. */",
  146.   "",
  147.   "#define yyless(n) \\",
  148.   "    do \\",
  149.   "        { \\",
  150.   "        /* Undo effects of setting up yytext. */ \\",
  151.   "        *yy_cp = yy_hold_char; \\",
  152.   "        yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \\",
  153.   "        YY_DO_BEFORE_ACTION; /* set up yytext again */ \\",
  154.   "        } \\",
  155.   "    while ( 0 )",
  156.   "",
  157.   "#define unput(c) yyunput( c, yytext_ptr )",
  158.   "",
  159.   "",
  160.   "struct yy_buffer_state",
  161.   "    {",
  162.   "%-",
  163.   "    FILE *yy_input_file;",
  164.   "%+",
  165.   "    istream* yy_input_file;",
  166.   "%*",
  167.   "",
  168.   "    char *yy_ch_buf;        /* input buffer */",
  169.   "    char *yy_buf_pos;        /* current position in input buffer */",
  170.   "",
  171.   "    /* Size of input buffer in bytes, not including room for EOB",
  172.   "     * characters.",
  173.   "     */",
  174.   "    int yy_buf_size;",
  175.   "",
  176.   "    /* Number of characters read into yy_ch_buf, not including EOB",
  177.   "     * characters.",
  178.   "     */",
  179.   "    int yy_n_chars;",
  180.   "",
  181.   "    /* Whether this is an \"interactive\" input source; if so, and",
  182.   "     * if we're using stdio for input, then we want to use getc()",
  183.   "     * instead of fread(), to make sure we stop fetching input after",
  184.   "     * each newline.",
  185.   "     */",
  186.   "    int yy_is_interactive;",
  187.   "",
  188.   "    /* Whether to try to fill the input buffer when we reach the",
  189.   "     * end of it.",
  190.   "     */",
  191.   "    int yy_fill_buffer;",
  192.   "",
  193.   "    /* Whether we've seen an EOF on this buffer. */",
  194.   "    int yy_eof_status;",
  195.   "#define EOF_NOT_SEEN 0",
  196.   "    /* \"Pending\" happens when the EOF has been seen but there's still",
  197.   "     * some text to process.  Note that when we actually see the EOF,",
  198.   "     * we switch the status back to \"not seen\" (via yyrestart()), so",
  199.   "     * that the user can continue scanning by just pointing yyin at",
  200.   "     * a new input file.",
  201.   "     */",
  202.   "#define EOF_PENDING 1",
  203.   "    };",
  204.   "",
  205.   "%- Standard (non-C++) definition",
  206.   "static YY_BUFFER_STATE yy_current_buffer = 0;",
  207.   "%*",
  208.   "",
  209.   "/* We provide macros for accessing buffer states in case in the",
  210.   " * future we want to put the buffer states in a more general",
  211.   " * \"scanner state\".",
  212.   " */",
  213.   "#define YY_CURRENT_BUFFER yy_current_buffer",
  214.   "",
  215.   "",
  216.   "%- Standard (non-C++) definition",
  217.   "/* yy_hold_char holds the character lost when yytext is formed. */",
  218.   "static char yy_hold_char;",
  219.   "",
  220.   "static int yy_n_chars;        /* number of characters read into yy_ch_buf */",
  221.   "",
  222.   "",
  223.   "int yyleng;",
  224.   "",
  225.   "/* Points to current character in buffer. */",
  226.   "static char *yy_c_buf_p = (char *) 0;",
  227.   "static int yy_init = 1;        /* whether we need to initialize */",
  228.   "static int yy_start = 0;    /* start state number */",
  229.   "",
  230.   "/* Flag which is used to allow yywrap()'s to do buffer switches",
  231.   " * instead of setting up a fresh yyin.  A bit of a hack ...",
  232.   " */",
  233.   "static int yy_did_buffer_switch_on_eof;",
  234.   "",
  235.   "static void yyunput YY_PROTO(( int c, char *buf_ptr ));",
  236.   "void yyrestart YY_PROTO(( FILE *input_file ));",
  237.   "void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));",
  238.   "void yy_load_buffer_state YY_PROTO(( void ));",
  239.   "YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));",
  240.   "void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));",
  241.   "void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));",
  242.   "",
  243.   "static int yy_start_stack_ptr = 0;",
  244.   "static int yy_start_stack_depth = 0;",
  245.   "static int *yy_start_stack = 0;",
  246.   "static void yy_push_state YY_PROTO(( int new_state ));",
  247.   "static void yy_pop_state YY_PROTO(( void ));",
  248.   "static int yy_top_state YY_PROTO(( void ));",
  249.   "%*",
  250.   "",
  251.   "#ifndef yytext_ptr",
  252.   "static void yy_flex_strcpy YY_PROTO(( char *, const char * ));",
  253.   "#endif",
  254.   "",
  255.   "static void *yy_flex_alloc YY_PROTO(( unsigned int ));",
  256.   "static void *yy_flex_realloc YY_PROTO(( void *ptr, unsigned int ));",
  257.   "static void yy_flex_free YY_PROTO(( void * ));",
  258.   "",
  259.   "#define yy_new_buffer yy_create_buffer",
  260.   "",
  261.   "%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here",
  262.   "",
  263.   "%- Standard (non-C++) definition",
  264.   "#ifdef __cplusplus",
  265.   "static int yyinput YY_PROTO(( void ));",
  266.   "#else",
  267.   "static int input YY_PROTO(( void ));",
  268.   "#endif",
  269.   "%*",
  270.   "",
  271.   "%- Standard (non-C++) definition",
  272.   "static yy_state_type yy_get_previous_state YY_PROTO(( void ));",
  273.   "static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));",
  274.   "static int yy_get_next_buffer YY_PROTO(( void ));",
  275.   "static void yy_fatal_error YY_PROTO(( const char msg[] ));",
  276.   "%*",
  277.   "",
  278.   "/* Done after the current pattern has been matched and before the",
  279.   " * corresponding action - sets up yytext.",
  280.   " */",
  281.   "#define YY_DO_BEFORE_ACTION \\",
  282.   "    yytext_ptr = yy_bp; \\",
  283.   "%% code to fiddle yytext and yyleng for yymore() goes here",
  284.   "    yy_hold_char = *yy_cp; \\",
  285.   "    *yy_cp = '\\0'; \\",
  286.   "%% code to copy yytext_ptr to yytext[] goes here, if %array",
  287.   "    yy_c_buf_p = yy_cp;",
  288.   "",
  289.   "%% data tables for the DFA and the user's section 1 definitions go here",
  290.   "",
  291.   "/* Macros after this point can all be overridden by user definitions in",
  292.   " * section 1.",
  293.   " */",
  294.   "",
  295.   "#ifdef YY_MALLOC_DECL",
  296.   "YY_MALLOC_DECL",
  297.   "#else",
  298.   "#if __STDC__",
  299.   "#ifndef __cplusplus",
  300.   "#include <stdlib.h>",
  301.   "#endif",
  302.   "#else",
  303.   "/* Just try to get by without declaring the routines.  This will fail",
  304.   " * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)",
  305.   " * or sizeof(void*) != sizeof(int).",
  306.   " */",
  307.   "#endif",
  308.   "#endif",
  309.   "",
  310.   "/* Amount of stuff to slurp up with each read. */",
  311.   "#ifndef YY_READ_BUF_SIZE",
  312.   "#define YY_READ_BUF_SIZE 8192",
  313.   "#endif",
  314.   "",
  315.   "/* Copy whatever the last rule matched to the standard output. */",
  316.   "",
  317.   "#ifndef ECHO",
  318.   "%- Standard (non-C++) definition",
  319.   "/* This used to be an fputs(), but since the string might contain NUL's,",
  320.   " * we now use fwrite().",
  321.   " */",
  322.   "#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )",
  323.   "%+ C++ definition",
  324.   "#define ECHO LexerOutput( yytext, yyleng )",
  325.   "%*",
  326.   "#endif",
  327.   "",
  328.   "/* Gets input and stuffs it into \"buf\".  number of characters read, or YY_NULL,",
  329.   " * is returned in \"result\".",
  330.   " */",
  331.   "#ifndef YY_INPUT",
  332.   "#define YY_INPUT(buf,result,max_size) \\",
  333.   "%% fread()/read() definition of YY_INPUT goes here unless we're doing C++",
  334.   "%+ C++ definition",
  335.   "    if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \\",
  336.   "        YY_FATAL_ERROR( \"input in flex scanner failed\" );",
  337.   "%*",
  338.   "#endif",
  339.   "",
  340.   "/* No semi-colon after return; correct usage is to write \"yyterminate();\" -",
  341.   " * we don't want an extra ';' after the \"return\" because that will cause",
  342.   " * some compilers to complain about unreachable statements.",
  343.   " */",
  344.   "#ifndef yyterminate",
  345.   "#define yyterminate() return YY_NULL",
  346.   "#endif",
  347.   "",
  348.   "/* Number of entries by which start-condition stack grows. */",
  349.   "#ifndef YY_START_STACK_INCR",
  350.   "#define YY_START_STACK_INCR 25",
  351.   "#endif",
  352.   "",
  353.   "/* Report a fatal error. */",
  354.   "#ifndef YY_FATAL_ERROR",
  355.   "%-",
  356.   "#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )",
  357.   "%+",
  358.   "#define YY_FATAL_ERROR(msg) LexerError( msg )",
  359.   "%*",
  360.   "#endif",
  361.   "",
  362.   "/* Default declaration of generated scanner - a define so the user can",
  363.   " * easily add parameters.",
  364.   " */",
  365.   "#ifndef YY_DECL",
  366.   "%- Standard (non-C++) definition",
  367.   "#define YY_DECL int yylex YY_PROTO(( void ))",
  368.   "%+ C++ definition",
  369.   "#define YY_DECL int yyFlexLexer::yylex()",
  370.   "%*",
  371.   "#endif",
  372.   "",
  373.   "/* Code executed at the beginning of each rule, after yytext and yyleng",
  374.   " * have been set up.",
  375.   " */",
  376.   "#ifndef YY_USER_ACTION",
  377.   "#define YY_USER_ACTION",
  378.   "#endif",
  379.   "",
  380.   "/* Code executed at the end of each rule. */",
  381.   "#ifndef YY_BREAK",
  382.   "#define YY_BREAK break;",
  383.   "#endif",
  384.   "",
  385.   "YY_DECL",
  386.   "    {",
  387.   "    register yy_state_type yy_current_state;",
  388.   "    register char *yy_cp, *yy_bp;",
  389.   "    register int yy_act;",
  390.   "",
  391.   "%% user's declarations go here",
  392.   "",
  393.   "    if ( yy_init )",
  394.   "        {",
  395.   "#ifdef YY_USER_INIT",
  396.   "        YY_USER_INIT;",
  397.   "#endif",
  398.   "",
  399.   "        if ( ! yy_start )",
  400.   "            yy_start = 1;    /* first start state */",
  401.   "",
  402.   "        if ( ! yyin )",
  403.   "%-",
  404.   "            yyin = stdin;",
  405.   "%+",
  406.   "            yyin = &cin;",
  407.   "%*",
  408.   "",
  409.   "        if ( ! yyout )",
  410.   "%-",
  411.   "            yyout = stdout;",
  412.   "%+",
  413.   "            yyout = &cout;",
  414.   "%*",
  415.   "",
  416.   "        if ( yy_current_buffer )",
  417.   "            yy_init_buffer( yy_current_buffer, yyin );",
  418.   "        else",
  419.   "            yy_current_buffer =",
  420.   "                yy_create_buffer( yyin, YY_BUF_SIZE );",
  421.   "",
  422.   "        yy_load_buffer_state();",
  423.   "",
  424.   "        yy_init = 0;",
  425.   "        }",
  426.   "",
  427.   "    while ( 1 )        /* loops until end-of-file is reached */",
  428.   "        {",
  429.   "%% yymore()-related code goes here",
  430.   "        yy_cp = yy_c_buf_p;",
  431.   "",
  432.   "        /* Support of yytext. */",
  433.   "        *yy_cp = yy_hold_char;",
  434.   "",
  435.   "        /* yy_bp points to the position in yy_ch_buf of the start of",
  436.   "         * the current run.",
  437.   "         */",
  438.   "        yy_bp = yy_cp;",
  439.   "",
  440.   "%% code to set up and find next match goes here",
  441.   "",
  442.   "yy_find_action:",
  443.   "%% code to find the action number goes here",
  444.   "",
  445.   "        YY_DO_BEFORE_ACTION;",
  446.   "",
  447.   "%% code for yylineno update goes here, if -l option",
  448.   "",
  449.   "do_action:    /* This label is used only to access EOF actions. */",
  450.   "",
  451.   "%% debug code goes here",
  452.   "",
  453.   "        switch ( yy_act )",
  454.   "    { /* beginning of action switch */",
  455.   "%% actions go here",
  456.   "",
  457.   "    case YY_END_OF_BUFFER:",
  458.   "        {",
  459.   "        /* Amount of text matched not including the EOB char. */",
  460.   "        int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;",
  461.   "",
  462.   "        /* Undo the effects of YY_DO_BEFORE_ACTION. */",
  463.   "        *yy_cp = yy_hold_char;",
  464.   "",
  465.   "        if ( yy_current_buffer->yy_input_file != yyin )",
  466.   "            {",
  467.   "            /* This can happen if we scan a file, yywrap() returns",
  468.   "             * 1, and then later the user points yyin at a new",
  469.   "             * file to resume scanning.  We have to assure",
  470.   "             * consistency between yy_current_buffer and our",
  471.   "             * globals.  Here is the right place to do so, because",
  472.   "             * this is the first action (other than possibly a",
  473.   "             * back-up) that will match for the new input file.",
  474.   "             */",
  475.   "            yy_current_buffer->yy_input_file = yyin;",
  476.   "            yy_n_chars = yy_current_buffer->yy_n_chars;",
  477.   "            }",
  478.   "",
  479.   "        /* Note that here we test for yy_c_buf_p \"<=\" to the position",
  480.   "         * of the first EOB in the buffer, since yy_c_buf_p will",
  481.   "         * already have been incremented past the NUL character",
  482.   "         * (since all states make transitions on EOB to the",
  483.   "         * end-of-buffer state).  Contrast this with the test",
  484.   "         * in input().",
  485.   "         */",
  486.   "        if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )",
  487.   "            { /* This was really a NUL. */",
  488.   "            yy_state_type yy_next_state;",
  489.   "",
  490.   "            yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;",
  491.   "",
  492.   "            yy_current_state = yy_get_previous_state();",
  493.   "",
  494.   "            /* Okay, we're now positioned to make the NUL",
  495.   "             * transition.  We couldn't have",
  496.   "             * yy_get_previous_state() go ahead and do it",
  497.   "             * for us because it doesn't know how to deal",
  498.   "             * with the possibility of jamming (and we don't",
  499.   "             * want to build jamming into it because then it",
  500.   "             * will run more slowly).",
  501.   "             */",
  502.   "",
  503.   "            yy_next_state = yy_try_NUL_trans( yy_current_state );",
  504.   "",
  505.   "            yy_bp = yytext_ptr + YY_MORE_ADJ;",
  506.   "",
  507.   "            if ( yy_next_state )",
  508.   "                {",
  509.   "                /* Consume the NUL. */",
  510.   "                yy_cp = ++yy_c_buf_p;",
  511.   "                yy_current_state = yy_next_state;",
  512.   "                goto yy_match;",
  513.   "                }",
  514.   "",
  515.   "            else",
  516.   "                {",
  517.   "%% code to do back-up for compressed tables and set up yy_cp goes here",
  518.   "                goto yy_find_action;",
  519.   "                }",
  520.   "            }",
  521.   "",
  522.   "        else switch ( yy_get_next_buffer() )",
  523.   "            {",
  524.   "            case EOB_ACT_END_OF_FILE:",
  525.   "                {",
  526.   "                yy_did_buffer_switch_on_eof = 0;",
  527.   "",
  528.   "                if ( yywrap() )",
  529.   "                    {",
  530.   "                    /* Note: because we've taken care in",
  531.   "                     * yy_get_next_buffer() to have set up",
  532.   "                     * yytext, we can now set up",
  533.   "                     * yy_c_buf_p so that if some total",
  534.   "                     * hoser (like flex itself) wants to",
  535.   "                     * call the scanner after we return the",
  536.   "                     * YY_NULL, it'll still work - another",
  537.   "                     * YY_NULL will get returned.",
  538.   "                     */",
  539.   "                    yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;",
  540.   "",
  541.   "                    yy_act = YY_STATE_EOF(YY_START);",
  542.   "                    goto do_action;",
  543.   "                    }",
  544.   "",
  545.   "                else",
  546.   "                    {",
  547.   "                    if ( ! yy_did_buffer_switch_on_eof )",
  548.   "                        YY_NEW_FILE;",
  549.   "                    }",
  550.   "                break;",
  551.   "                }",
  552.   "",
  553.   "            case EOB_ACT_CONTINUE_SCAN:",
  554.   "                yy_c_buf_p =",
  555.   "                    yytext_ptr + yy_amount_of_matched_text;",
  556.   "",
  557.   "                yy_current_state = yy_get_previous_state();",
  558.   "",
  559.   "                yy_cp = yy_c_buf_p;",
  560.   "                yy_bp = yytext_ptr + YY_MORE_ADJ;",
  561.   "                goto yy_match;",
  562.   "",
  563.   "            case EOB_ACT_LAST_MATCH:",
  564.   "                yy_c_buf_p =",
  565.   "                &yy_current_buffer->yy_ch_buf[yy_n_chars];",
  566.   "",
  567.   "                yy_current_state = yy_get_previous_state();",
  568.   "",
  569.   "                yy_cp = yy_c_buf_p;",
  570.   "                yy_bp = yytext_ptr + YY_MORE_ADJ;",
  571.   "                goto yy_find_action;",
  572.   "            }",
  573.   "        break;",
  574.   "        }",
  575.   "",
  576.   "    default:",
  577.   "        YY_FATAL_ERROR(",
  578.   "            \"fatal flex scanner internal error--no action found\" );",
  579.   "    } /* end of action switch */",
  580.   "        } /* end of scanning one token */",
  581.   "    } /* end of yylex */",
  582.   "",
  583.   "%+",
  584.   "#ifdef YY_INTERACTIVE",
  585.   "int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )",
  586.   "#else",
  587.   "int yyFlexLexer::LexerInput( char* buf, int max_size )",
  588.   "#endif",
  589.   "    {",
  590.   "    if ( yyin->eof() || yyin->fail() )",
  591.   "        return 0;",
  592.   "",
  593.   "#ifdef YY_INTERACTIVE",
  594.   "    yyin->get( buf[0] );",
  595.   "",
  596.   "    if ( yyin->eof() )",
  597.   "        return 0;",
  598.   "",
  599.   "    if ( yyin->bad() )",
  600.   "        return -1;",
  601.   "",
  602.   "    return 1;",
  603.   "",
  604.   "#else",
  605.   "    (void) yyin->read( buf, max_size );",
  606.   "",
  607.   "    if ( yyin->bad() )",
  608.   "        return -1;",
  609.   "    else",
  610.   "        return yyin->gcount();",
  611.   "#endif",
  612.   "    }",
  613.   "",
  614.   "void yyFlexLexer::LexerOutput( const char* buf, int size )",
  615.   "    {",
  616.   "    (void) yyout->write( buf, size );",
  617.   "    }",
  618.   "%*",
  619.   "",
  620.   "/* yy_get_next_buffer - try to read in a new buffer",
  621.   " *",
  622.   " * Returns a code representing an action:",
  623.   " *    EOB_ACT_LAST_MATCH -",
  624.   " *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position",
  625.   " *    EOB_ACT_END_OF_FILE - end of file",
  626.   " */",
  627.   "",
  628.   "%-",
  629.   "static int yy_get_next_buffer()",
  630.   "%+",
  631.   "int yyFlexLexer::yy_get_next_buffer()",
  632.   "%*",
  633.   "    {",
  634.   "    register char *dest = yy_current_buffer->yy_ch_buf;",
  635.   "    register char *source = yytext_ptr - 1; /* copy prev. char, too */",
  636.   "    register int number_to_move, i;",
  637.   "    int ret_val;",
  638.   "",
  639.   "    if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )",
  640.   "        YY_FATAL_ERROR(",
  641.   "        \"fatal flex scanner internal error--end of buffer missed\" );",
  642.   "",
  643.   "    if ( yy_current_buffer->yy_fill_buffer == 0 )",
  644.   "        { /* Don't try to fill the buffer, so this is an EOF. */",
  645.   "        if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )",
  646.   "            {",
  647.   "            /* We matched a singled characater, the EOB, so",
  648.   "             * treat this as a final EOF.",
  649.   "             */",
  650.   "            return EOB_ACT_END_OF_FILE;",
  651.   "            }",
  652.   "",
  653.   "        else",
  654.   "            {",
  655.   "            /* We matched some text prior to the EOB, first",
  656.   "             * process it.",
  657.   "             */",
  658.   "            return EOB_ACT_LAST_MATCH;",
  659.   "            }",
  660.   "        }",
  661.   "",
  662.   "    /* Try to read more data. */",
  663.   "",
  664.   "    /* First move last chars to start of buffer. */",
  665.   "    number_to_move = yy_c_buf_p - yytext_ptr;",
  666.   "",
  667.   "    for ( i = 0; i < number_to_move; ++i )",
  668.   "        *(dest++) = *(source++);",
  669.   "",
  670.   "    if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )",
  671.   "        /* don't do the read, it's not guaranteed to return an EOF,",
  672.   "         * just force an EOF",
  673.   "         */",
  674.   "        yy_n_chars = 0;",
  675.   "",
  676.   "    else",
  677.   "        {",
  678.   "        int num_to_read =",
  679.   "            yy_current_buffer->yy_buf_size - number_to_move - 1;",
  680.   "",
  681.   "        while ( num_to_read <= 0 )",
  682.   "            { /* Not enough room in the buffer - grow it. */",
  683.   "#ifdef YY_USES_REJECT",
  684.   "            YY_FATAL_ERROR(",
  685.   "\"input buffer overflow, can't enlarge buffer because scanner uses REJECT\" );",
  686.   "#else",
  687.   "",
  688.   "            /* just a shorter name for the current buffer */",
  689.   "            YY_BUFFER_STATE b = yy_current_buffer;",
  690.   "",
  691.   "            int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;",
  692.   "",
  693.   "            b->yy_buf_size *= 2;",
  694.   "            b->yy_ch_buf = (char *)",
  695.   "                yy_flex_realloc( (void *) b->yy_ch_buf,",
  696.   "                         b->yy_buf_size );",
  697.   "",
  698.   "            if ( ! b->yy_ch_buf )",
  699.   "                YY_FATAL_ERROR(",
  700.   "                \"fatal error - scanner input buffer overflow\" );",
  701.   "",
  702.   "            yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];",
  703.   "",
  704.   "            num_to_read = yy_current_buffer->yy_buf_size -",
  705.   "                        number_to_move - 1;",
  706.   "#endif",
  707.   "            }",
  708.   "",
  709.   "        if ( num_to_read > YY_READ_BUF_SIZE )",
  710.   "            num_to_read = YY_READ_BUF_SIZE;",
  711.   "",
  712.   "        /* Read in more data. */",
  713.   "        YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),",
  714.   "            yy_n_chars, num_to_read );",
  715.   "        }",
  716.   "",
  717.   "    if ( yy_n_chars == 0 )",
  718.   "        {",
  719.   "        if ( number_to_move - YY_MORE_ADJ == 1 )",
  720.   "            {",
  721.   "            ret_val = EOB_ACT_END_OF_FILE;",
  722.   "            yyrestart( yyin );",
  723.   "            }",
  724.   "",
  725.   "        else",
  726.   "            {",
  727.   "            ret_val = EOB_ACT_LAST_MATCH;",
  728.   "            yy_current_buffer->yy_eof_status = EOF_PENDING;",
  729.   "            }",
  730.   "        }",
  731.   "",
  732.   "    else",
  733.   "        ret_val = EOB_ACT_CONTINUE_SCAN;",
  734.   "",
  735.   "    yy_n_chars += number_to_move;",
  736.   "    yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;",
  737.   "    yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;",
  738.   "",
  739.   "    /* yytext begins at the second character in yy_ch_buf; the first",
  740.   "     * character is the one which preceded it before reading in the latest",
  741.   "     * buffer; it needs to be kept around in case it's a newline, so",
  742.   "     * yy_get_previous_state() will have with '^' rules active.",
  743.   "     */",
  744.   "",
  745.   "    yytext_ptr = &yy_current_buffer->yy_ch_buf[1];",
  746.   "",
  747.   "    return ret_val;",
  748.   "    }",
  749.   "",
  750.   "",
  751.   "/* yy_get_previous_state - get the state just before the EOB char was reached */",
  752.   "",
  753.   "%-",
  754.   "static yy_state_type yy_get_previous_state()",
  755.   "%+",
  756.   "yy_state_type yyFlexLexer::yy_get_previous_state()",
  757.   "%*",
  758.   "    {",
  759.   "    register yy_state_type yy_current_state;",
  760.   "    register char *yy_cp;",
  761.   "",
  762.   "%% code to get the start state into yy_current_state goes here",
  763.   "",
  764.   "    for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )",
  765.   "        {",
  766.   "%% code to find the next state goes here",
  767.   "        }",
  768.   "",
  769.   "    return yy_current_state;",
  770.   "    }",
  771.   "",
  772.   "",
  773.   "/* yy_try_NUL_trans - try to make a transition on the NUL character",
  774.   " *",
  775.   " * synopsis",
  776.   " *    next_state = yy_try_NUL_trans( current_state );",
  777.   " */",
  778.   "",
  779.   "%-",
  780.   "#ifdef YY_USE_PROTOS",
  781.   "static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )",
  782.   "#else",
  783.   "static yy_state_type yy_try_NUL_trans( yy_current_state )",
  784.   "yy_state_type yy_current_state;",
  785.   "#endif",
  786.   "%+",
  787.   "yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )",
  788.   "%*",
  789.   "    {",
  790.   "    register int yy_is_jam;",
  791.   "%% code to find the next state, and perhaps do backing up, goes here",
  792.   "",
  793.   "    return yy_is_jam ? 0 : yy_current_state;",
  794.   "    }",
  795.   "",
  796.   "",
  797.   "%-",
  798.   "#ifdef YY_USE_PROTOS",
  799.   "static void yyunput( int c, register char *yy_bp )",
  800.   "#else",
  801.   "static void yyunput( c, yy_bp )",
  802.   "int c;",
  803.   "register char *yy_bp;",
  804.   "#endif",
  805.   "%+",
  806.   "void yyFlexLexer::yyunput( int c, register char* yy_bp )",
  807.   "%*",
  808.   "    {",
  809.   "    register char *yy_cp = yy_c_buf_p;",
  810.   "",
  811.   "    /* undo effects of setting up yytext */",
  812.   "    *yy_cp = yy_hold_char;",
  813.   "",
  814.   "    if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )",
  815.   "        { /* need to shift things up to make room */",
  816.   "        /* +2 for EOB chars. */",
  817.   "        register int number_to_move = yy_n_chars + 2;",
  818.   "        register char *dest = &yy_current_buffer->yy_ch_buf[",
  819.   "                    yy_current_buffer->yy_buf_size + 2];",
  820.   "        register char *source =",
  821.   "                &yy_current_buffer->yy_ch_buf[number_to_move];",
  822.   "",
  823.   "        while ( source > yy_current_buffer->yy_ch_buf )",
  824.   "            *--dest = *--source;",
  825.   "",
  826.   "        yy_cp += dest - source;",
  827.   "        yy_bp += dest - source;",
  828.   "        yy_n_chars = yy_current_buffer->yy_buf_size;",
  829.   "",
  830.   "        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )",
  831.   "            YY_FATAL_ERROR( \"flex scanner push-back overflow\" );",
  832.   "        }",
  833.   "",
  834.   "    if ( yy_cp > yy_bp && yy_cp[-1] == '\\n' )",
  835.   "        yy_cp[-2] = '\\n';",
  836.   "",
  837.   "    *--yy_cp = (char) c;",
  838.   "",
  839.   "%% update yylineno here, if doing -l",
  840.   "",
  841.   "    /* Note: the formal parameter *must* be called \"yy_bp\" for this",
  842.   "     * macro to now work correctly.",
  843.   "     */",
  844.   "    YY_DO_BEFORE_ACTION; /* set up yytext again */",
  845.   "    }",
  846.   "",
  847.   "",
  848.   "%-",
  849.   "#ifdef __cplusplus",
  850.   "static int yyinput()",
  851.   "#else",
  852.   "static int input()",
  853.   "#endif",
  854.   "%+",
  855.   "int yyFlexLexer::yyinput()",
  856.   "%*",
  857.   "    {",
  858.   "    int c;",
  859.   "",
  860.   "    *yy_c_buf_p = yy_hold_char;",
  861.   "",
  862.   "    if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )",
  863.   "        {",
  864.   "        /* yy_c_buf_p now points to the character we want to return.",
  865.   "         * If this occurs *before* the EOB characters, then it's a",
  866.   "         * valid NUL; if not, then we've hit the end of the buffer.",
  867.   "         */",
  868.   "        if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )",
  869.   "            /* This was really a NUL. */",
  870.   "            *yy_c_buf_p = '\\0';",
  871.   "",
  872.   "        else",
  873.   "            { /* need more input */",
  874.   "            yytext_ptr = yy_c_buf_p;",
  875.   "            ++yy_c_buf_p;",
  876.   "",
  877.   "            switch ( yy_get_next_buffer() )",
  878.   "                {",
  879.   "                case EOB_ACT_END_OF_FILE:",
  880.   "                    {",
  881.   "                    if ( yywrap() )",
  882.   "                        {",
  883.   "                        yy_c_buf_p =",
  884.   "                        yytext_ptr + YY_MORE_ADJ;",
  885.   "                        return EOF;",
  886.   "                        }",
  887.   "",
  888.   "                    YY_NEW_FILE;",
  889.   "#ifdef __cplusplus",
  890.   "                    return yyinput();",
  891.   "#else",
  892.   "                    return input();",
  893.   "#endif",
  894.   "                    }",
  895.   "",
  896.   "                case EOB_ACT_CONTINUE_SCAN:",
  897.   "                    yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;",
  898.   "                    break;",
  899.   "",
  900.   "                case EOB_ACT_LAST_MATCH:",
  901.   "#ifdef __cplusplus",
  902.   "                    YY_FATAL_ERROR(",
  903.   "                    \"unexpected last match in yyinput()\" );",
  904.   "#else",
  905.   "                    YY_FATAL_ERROR(",
  906.   "                    \"unexpected last match in input()\" );",
  907.   "#endif",
  908.   "                }",
  909.   "            }",
  910.   "        }",
  911.   "",
  912.   "    c = *yy_c_buf_p;",
  913.   "    *yy_c_buf_p = '\\0';    /* preserve yytext */",
  914.   "    yy_hold_char = *++yy_c_buf_p;",
  915.   "",
  916.   "    return c;",
  917.   "    }",
  918.   "",
  919.   "",
  920.   "%-",
  921.   "#ifdef YY_USE_PROTOS",
  922.   "void yyrestart( FILE *input_file )",
  923.   "#else",
  924.   "void yyrestart( input_file )",
  925.   "FILE *input_file;",
  926.   "#endif",
  927.   "%+",
  928.   "void yyFlexLexer::yyrestart( istream* input_file )",
  929.   "%*",
  930.   "    {",
  931.   "    if ( ! yy_current_buffer )",
  932.   "        yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );",
  933.   "",
  934.   "    yy_init_buffer( yy_current_buffer, input_file );",
  935.   "    yy_load_buffer_state();",
  936.   "    }",
  937.   "",
  938.   "",
  939.   "%-",
  940.   "#ifdef YY_USE_PROTOS",
  941.   "void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )",
  942.   "#else",
  943.   "void yy_switch_to_buffer( new_buffer )",
  944.   "YY_BUFFER_STATE new_buffer;",
  945.   "#endif",
  946.   "%+",
  947.   "void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )",
  948.   "%*",
  949.   "    {",
  950.   "    if ( yy_current_buffer == new_buffer )",
  951.   "        return;",
  952.   "",
  953.   "    if ( yy_current_buffer )",
  954.   "        {",
  955.   "        /* Flush out information for old buffer. */",
  956.   "        *yy_c_buf_p = yy_hold_char;",
  957.   "        yy_current_buffer->yy_buf_pos = yy_c_buf_p;",
  958.   "        yy_current_buffer->yy_n_chars = yy_n_chars;",
  959.   "        }",
  960.   "",
  961.   "    yy_current_buffer = new_buffer;",
  962.   "    yy_load_buffer_state();",
  963.   "",
  964.   "    /* We don't actually know whether we did this switch during",
  965.   "     * EOF (yywrap()) processing, but the only time this flag",
  966.   "     * is looked at is after yywrap() is called, so it's safe",
  967.   "     * to go ahead and always set it.",
  968.   "     */",
  969.   "    yy_did_buffer_switch_on_eof = 1;",
  970.   "    }",
  971.   "",
  972.   "",
  973.   "%-",
  974.   "#ifdef YY_USE_PROTOS",
  975.   "void yy_load_buffer_state( void )",
  976.   "#else",
  977.   "void yy_load_buffer_state()",
  978.   "#endif",
  979.   "%+",
  980.   "void yyFlexLexer::yy_load_buffer_state()",
  981.   "%*",
  982.   "    {",
  983.   "    yy_n_chars = yy_current_buffer->yy_n_chars;",
  984.   "    yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;",
  985.   "    yyin = yy_current_buffer->yy_input_file;",
  986.   "    yy_hold_char = *yy_c_buf_p;",
  987.   "    }",
  988.   "",
  989.   "",
  990.   "%-",
  991.   "#ifdef YY_USE_PROTOS",
  992.   "YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )",
  993.   "#else",
  994.   "YY_BUFFER_STATE yy_create_buffer( file, size )",
  995.   "FILE *file;",
  996.   "int size;",
  997.   "#endif",
  998.   "%+",
  999.   "YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )",
  1000.   "%*",
  1001.   "    {",
  1002.   "    YY_BUFFER_STATE b;",
  1003.   "",
  1004.   "    b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );",
  1005.   "",
  1006.   "    if ( ! b )",
  1007.   "        YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
  1008.   "",
  1009.   "    b->yy_buf_size = size;",
  1010.   "",
  1011.   "    /* yy_ch_buf has to be 2 characters longer than the size given because",
  1012.   "     * we need to put in 2 end-of-buffer characters.",
  1013.   "     */",
  1014.   "    b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );",
  1015.   "",
  1016.   "    if ( ! b->yy_ch_buf )",
  1017.   "        YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
  1018.   "",
  1019.   "    yy_init_buffer( b, file );",
  1020.   "",
  1021.   "    return b;",
  1022.   "    }",
  1023.   "",
  1024.   "",
  1025.   "%-",
  1026.   "#ifdef YY_USE_PROTOS",
  1027.   "void yy_delete_buffer( YY_BUFFER_STATE b )",
  1028.   "#else",
  1029.   "void yy_delete_buffer( b )",
  1030.   "YY_BUFFER_STATE b;",
  1031.   "#endif",
  1032.   "%+",
  1033.   "void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )",
  1034.   "%*",
  1035.   "    {",
  1036.   "    if ( b == yy_current_buffer )",
  1037.   "        yy_current_buffer = (YY_BUFFER_STATE) 0;",
  1038.   "",
  1039.   "    yy_flex_free( (void *) b->yy_ch_buf );",
  1040.   "    yy_flex_free( (void *) b );",
  1041.   "    }",
  1042.   "",
  1043.   "",
  1044.   "%-",
  1045.   "#ifdef YY_USE_PROTOS",
  1046.   "void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )",
  1047.   "#else",
  1048.   "void yy_init_buffer( b, file )",
  1049.   "YY_BUFFER_STATE b;",
  1050.   "FILE *file;",
  1051.   "#endif",
  1052.   "%+",
  1053.   "void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )",
  1054.   "%*",
  1055.   "    {",
  1056.   "    b->yy_input_file = file;",
  1057.   "",
  1058.   "    /* We put in the '\\n' and start reading from [1] so that an",
  1059.   "     * initial match-at-newline will be true.",
  1060.   "     */",
  1061.   "",
  1062.   "    b->yy_ch_buf[0] = '\\n';",
  1063.   "    b->yy_n_chars = 1;",
  1064.   "",
  1065.   "    /* We always need two end-of-buffer characters.  The first causes",
  1066.   "     * a transition to the end-of-buffer state.  The second causes",
  1067.   "     * a jam in that state.",
  1068.   "     */",
  1069.   "    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;",
  1070.   "    b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;",
  1071.   "",
  1072.   "    b->yy_buf_pos = &b->yy_ch_buf[1];",
  1073.   "",
  1074.   "%-",
  1075.   "    b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;",
  1076.   "%+",
  1077.   "    b->yy_is_interactive = 0;",
  1078.   "%*",
  1079.   "",
  1080.   "    b->yy_fill_buffer = 1;",
  1081.   "",
  1082.   "    b->yy_eof_status = EOF_NOT_SEEN;",
  1083.   "    }",
  1084.   "",
  1085.   "",
  1086.   "%-",
  1087.   "#ifdef YY_USE_PROTOS",
  1088.   "static void yy_push_state( int new_state )",
  1089.   "#else",
  1090.   "static void yy_push_state( new_state )",
  1091.   "int new_state;",
  1092.   "#endif",
  1093.   "%+",
  1094.   "void yyFlexLexer::yy_push_state( int new_state )",
  1095.   "%*",
  1096.   "    {",
  1097.   "    if ( yy_start_stack_ptr >= yy_start_stack_depth )",
  1098.   "        {",
  1099.   "        int new_size;",
  1100.   "",
  1101.   "        yy_start_stack_depth += YY_START_STACK_INCR;",
  1102.   "        new_size = yy_start_stack_depth * sizeof( int );",
  1103.   "",
  1104.   "        if ( ! yy_start_stack )",
  1105.   "            yy_start_stack = (int *) yy_flex_alloc( new_size );",
  1106.   "",
  1107.   "        else",
  1108.   "            yy_start_stack = (int *) yy_flex_realloc(",
  1109.   "                    (void *) yy_start_stack, new_size );",
  1110.   "",
  1111.   "        if ( ! yy_start_stack )",
  1112.   "            YY_FATAL_ERROR(",
  1113.   "            \"out of memory expanding start-condition stack\" );",
  1114.   "        }",
  1115.   "",
  1116.   "    yy_start_stack[yy_start_stack_ptr++] = YY_START;",
  1117.   "",
  1118.   "    BEGIN(new_state);",
  1119.   "    }",
  1120.   "",
  1121.   "",
  1122.   "%-",
  1123.   "static void yy_pop_state()",
  1124.   "%+",
  1125.   "void yyFlexLexer::yy_pop_state()",
  1126.   "%*",
  1127.   "    {",
  1128.   "    if ( --yy_start_stack_ptr < 0 )",
  1129.   "        YY_FATAL_ERROR( \"start-condition stack underflow\" );",
  1130.   "",
  1131.   "    BEGIN(yy_start_stack[yy_start_stack_ptr]);",
  1132.   "    }",
  1133.   "",
  1134.   "",
  1135.   "%-",
  1136.   "static int yy_top_state()",
  1137.   "%+",
  1138.   "int yyFlexLexer::yy_top_state()",
  1139.   "%*",
  1140.   "    {",
  1141.   "    return yy_start_stack[yy_start_stack_ptr - 1];",
  1142.   "    }",
  1143.   "",
  1144.   "",
  1145.   "%-",
  1146.   "#ifdef YY_USE_PROTOS",
  1147.   "static void yy_fatal_error( const char msg[] )",
  1148.   "#else",
  1149.   "static void yy_fatal_error( msg )",
  1150.   "char msg[];",
  1151.   "#endif",
  1152.   "    {",
  1153.   "    (void) fprintf( stderr, \"%s\\n\", msg );",
  1154.   "    exit( 1 );",
  1155.   "    }",
  1156.   "",
  1157.   "%+",
  1158.   "",
  1159.   "void yyFlexLexer::LexerError( const char msg[] )",
  1160.   "    {",
  1161.   "    cerr << msg << '\\n';",
  1162.   "    exit( 1 );",
  1163.   "    }",
  1164.   "%*",
  1165.   "",
  1166.   "",
  1167.   "/* Redefine yyless() so it works in section 3 code. */",
  1168.   "",
  1169.   "#undef yyless",
  1170.   "#define yyless(n) \\",
  1171.   "    do \\",
  1172.   "        { \\",
  1173.   "        /* Undo effects of setting up yytext. */ \\",
  1174.   "        yytext[yyleng] = yy_hold_char; \\",
  1175.   "        yy_c_buf_p = yytext + n - YY_MORE_ADJ; \\",
  1176.   "        yy_hold_char = *yy_c_buf_p; \\",
  1177.   "        *yy_c_buf_p = '\\0'; \\",
  1178.   "        yyleng = n; \\",
  1179.   "        } \\",
  1180.   "    while ( 0 )",
  1181.   "",
  1182.   "",
  1183.   "/* Internal utility routines. */",
  1184.   "",
  1185.   "#ifndef yytext_ptr",
  1186.   "#ifdef YY_USE_PROTOS",
  1187.   "static void yy_flex_strcpy( char *s1, const char *s2 )",
  1188.   "#else",
  1189.   "static void yy_flex_strcpy( s1, s2 )",
  1190.   "char *s1;",
  1191.   "const char *s2;",
  1192.   "#endif",
  1193.   "    {",
  1194.   "    while ( (*(s1++) = *(s2++)) )",
  1195.   "        ;",
  1196.   "    }",
  1197.   "#endif",
  1198.   "",
  1199.   "",
  1200.   "#ifdef YY_USE_PROTOS",
  1201.   "static void *yy_flex_alloc( unsigned int size )",
  1202.   "#else",
  1203.   "static void *yy_flex_alloc( size )",
  1204.   "unsigned int size;",
  1205.   "#endif",
  1206.   "    {",
  1207.   "    return (void *) malloc( size );",
  1208.   "    }",
  1209.   "",
  1210.   "#ifdef YY_USE_PROTOS",
  1211.   "static void *yy_flex_realloc( void *ptr, unsigned int size )",
  1212.   "#else",
  1213.   "static void *yy_flex_realloc( ptr, size )",
  1214.   "void *ptr;",
  1215.   "unsigned int size;",
  1216.   "#endif",
  1217.   "    {",
  1218.   "    return (void *) realloc( ptr, size );",
  1219.   "    }",
  1220.   "",
  1221.   "#ifdef YY_USE_PROTOS",
  1222.   "static void yy_flex_free( void *ptr )",
  1223.   "#else",
  1224.   "static void yy_flex_free( ptr )",
  1225.   "void *ptr;",
  1226.   "#endif",
  1227.   "    {",
  1228.   "    free( ptr );",
  1229.   "    }",
  1230.   0
  1231. };
  1232.